/*Copyright (C) 2013-2021 LZE*/
#include<bits/stdc++.h>
#define INF 0x7fffffff
#define mod 1000000007
#define eps 1e-6
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
const int N = 60;
ll T,n;
int main() {
    scanf("%lld",&T);
    ll t,ans;
    while(T--){
        scanf("%lld",&n);
        ans = 0;
        for(ll i = 1;i <= n;i++){
            scanf("%lld",&t);
            ans ^= t;
        }
        if(ans)printf("Yes\n");
        else printf("No\n");
    }
	return 0;
}
